package com.abing.observer.test1;

import com.abing.observer.test1.observer.impl.UserObServer;
import com.abing.observer.test1.subject.AbstractSubject;
import com.abing.observer.test1.subject.impl.WeChatSubject;

public class Test1 {

    public static void main(String[] args) {
        AbstractSubject abstractSubject=new WeChatSubject();
        abstractSubject.addObServer(new UserObServer("小明"));
        abstractSubject.addObServer(new UserObServer("小王"));
        abstractSubject.notifyObServer("发送消息，您有一个通知！");
    }
}
